import math
print "Nhap 3 so a,b,c (a#0)"
a = None

while not a:

         try:

             a = int(raw_input())

         except ValueError:

             print 'Invalid Number'
b = None

while not b:

         try:

             b = int(raw_input())

         except ValueError:

             print 'Invalid Number'
c = None

while not c:

         try:

            c = int(raw_input())

         except ValueError:

             print 'Invalid Number'
delta= b*b - 4 * a * c
if delta == 0 :
	print "Co 1 nghiem kep:"
	x = -b/2/a
	print format(x,"0.4f")
elif delta > 0 :
	print "PT co 2 nghiem phan biet:"
	x1 = (-b + math.sqrt(delta))/2/a
	x2 = (-b - math.sqrt(delta))/2/a
	print "x1 = ", format(x1,"0.4f"), "; ", "x2 = ", format(x2,"0.4f")
else :
	print "PT co 2 nghiem phuc:"
	xa1 = (-b )/(2*a)
	xa2 = (-b )/(2*a)
	xb1 = (math.sqrt(-delta))/(2*a)
	xb2 = (math.sqrt(-delta))/(2*a)
	print "x1 = ", format(xa1,"0.4f")," + ", format(xb1,"0.4f"),"* i", " ; ", "x2 = ",  format(xa2,"0.4f")," - ", format(xb2,"0.4f"),"* i"
	